package com.zhinong.mapper;


import com.github.pagehelper.Page;
import com.zhinong.dto.ProductPageQueryDTO;
import com.zhinong.entity.Employee;
import com.zhinong.entity.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ProductMapper {

    @Insert("insert into product(product_name,price,product_type,quantity)values( #{productName}, #{price}, #{productType}, #{quantity})")
    void insert(Product product);

    Page<Product> pageQuery(ProductPageQueryDTO productPageQueryDTO);


    @Delete("delete from product where product_id = #{productId}")
    void deteleById(Long productId);

    void update(Product product);

    List<Product> getByIds(List<Long> ids);
}
